package com.epam.task.web.dao;

import com.epam.task.web.dao.impl.CustomerDAO;
import com.epam.task.web.dao.impl.mysql.MYSQLDAOFactory;
import com.epam.task.web.db.exception.CannotTakeConnectionException;

/**
 * User: zhunusbekova.arailym
 */

public abstract class DAOFactory {
    public static final int MYSQL = 1;

    public abstract CustomerDAO getCustomerDAO() throws CannotTakeConnectionException;

    public static DAOFactory getDAOFactory(int whichFactory){
        switch(whichFactory){
            case MYSQL :
                return new MYSQLDAOFactory();
            default:
                return null;
        }
    }
}

